﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using SaludOcupacional.DataAccess;
using SaludOcupacional.Exceptions;
using SaludOcupacional.Model;
namespace SaludOcupacional.Controller
{
    public class OftalmologicoManager
    {
        public static Oftalmologico BuscarAnalisisPorCi(int ci)
        {
 

            Oftalmologico oftal = new Oftalmologico();

            using (OftalmologicoDataAccess daccess = new OftalmologicoDataAccess())
            {
                oftal = daccess.BuscarAnalisisPorCi(ci);
                return oftal;
            }
        }

        public static void RegistrarAnalisis(Oftalmologico oftal)
        {
            using (OftalmologicoDataAccess daccess = new OftalmologicoDataAccess())
            {
                daccess.RegistrarAnalisis(oftal);

            }
        }

        public static void EditarAnalisis(Oftalmologico oftal)
        {
            using (OftalmologicoDataAccess daccess = new OftalmologicoDataAccess())
            {
                daccess.EditarAnalisis(oftal);

            }
        }
    }
}
